<template>
    <div>
  
      <!-- 弹出框1 -->
      <vol-box :lazy="true"
               v-model="model.box1"
               title="弹出框1"
               :height="400"
               :width="700"
               :padding="15">
        <div>弹出框1   //vue3版本Button改为el-button具体见elemen-puls文档
          <el-button type="info"
                  @click="getParent">获取父组件对象</el-button>
          <p>通过 this.$emit("parentCall", $vue => {})可以访问父组件ViewGird中的任何属性、对象、方法</p>
          <p>{{model.box1Text}}</p>
        </div>
      </vol-box>
    </div>
</template>

<script>
import VolBox from "@/components/basic/VolBox.vue";
export default {
  components: { "vol-box": VolBox },
  methods: {
  },
  data () {
    return {
      model: {
        box1Text: "",
        box1: false,
        box1Text: "",
        box2: false,
        box3: false,
        box3Row: {}
      }
    }
  },
  methods: {
    getParent () {
      this.$emit("parentCall", $vue => {
        this.model.box1Text = JSON.stringify($vue.buttons);
      })
    },
    getTestData () {
      return "这里是获取到的子组件对象" + JSON.stringify(this.model);
    },
    //弹出框1
    open1 () {
      this.model.box1 = true;
    }
    
  }
};
</script>